/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import moment from 'moment';

export const formatBrandList = (
  brandList: {
    brand: string;
    order_type?: number | string;
    name: string;
  }[],
  nameSpace: string,
) => {
  return brandList.map((item) => {
    return {
      value: item[nameSpace === 'name' ? 'brand' : 'order_type'],
      label: item[nameSpace],
      order_type: item.order_type,
    };
  });
};
export const initialValues = {
  start_time: moment().format('YYYY-MM-DD'),
  end_time: moment().format('YYYY-MM-DD'),
};
export const initialFormValues = {
  datePicker: [moment().subtract(1, 'month'), moment()],
};
